package com.ruoyi.car.controller.parts;

import com.car.pojo.TbPartBatteryPackInformation;
import com.ruoyi.car.service.parts.ITbPartBatteryPackInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/pack/information")
public class TbPartBatteryPackInformationController {

    @Autowired
    private ITbPartBatteryPackInformationService tbPartBatteryPackInformationService;

    @GetMapping("/findone/{id}")
    @ResponseBody
    public TbPartBatteryPackInformation findone(@PathVariable("id")Long id){
        TbPartBatteryPackInformation one = tbPartBatteryPackInformationService.findOne(id);
        System.out.println(one);
        return one;
    }
    @GetMapping("/findAll")
    @ResponseBody
    public List<TbPartBatteryPackInformation> findAll(){
        List<TbPartBatteryPackInformation> one = tbPartBatteryPackInformationService.findAll();

        return one;
    }

}
